Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tome
Tales of MajEyal
Commits
2a25fed8
Commit
2a25fed8
authored
14 years ago
by
dg
Browse files
Options
Downloads
Patches
Plain Diff
fix
git-svn-id:
http://svn.net-core.org/repos/t-engine4@914
51575b47-30f0-44d4-a5cc-537603b46e54
parent
97d6c6ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
game/engine/Entity.lua
+2
-1
2 additions, 1 deletion
game/engine/Entity.lua
game/engine/Shader.lua
+5
-4
5 additions, 4 deletions
game/engine/Shader.lua
src/shaders.c
+2
-1
2 additions, 1 deletion
src/shaders.c
with
9 additions
and
6 deletions
game/engine/Entity.lua
+
2
−
1
View file @
2a25fed8
...
...
@@ -195,7 +195,8 @@ function _M:makeMapObject(tiles, idx)
-- Setup shader
if
tiles
.
use_images
and
core
.
shader
.
active
()
and
self
.
shader
then
self
.
_mo
:
shader
(
Shader
.
new
(
self
.
shader
,
self
.
shader_args
).
shad
)
local
shad
=
Shader
.
new
(
self
.
shader
,
self
.
shader_args
)
if
shad
.
shad
then
self
.
_mo
:
shader
(
shad
.
shad
)
end
end
return
self
.
_mo
,
self
.
z
...
...
This diff is collapsed.
Click to expand it.
game/engine/Shader.lua
+
5
−
4
View file @
2a25fed8
...
...
@@ -101,7 +101,7 @@ function _M:createProgram(def)
local
shad
=
core
.
shader
.
newProgram
()
if
def
.
vert
then
shad
:
attach
(
self
:
getVertex
(
def
.
vert
))
end
if
def
.
frag
then
shad
:
attach
(
self
:
getFragment
(
def
.
frag
))
end
shad
:
compile
()
if
not
shad
:
compile
()
then
return
nil
end
return
shad
end
...
...
@@ -119,9 +119,10 @@ function _M:loaded()
_M
.
progs
[
self
.
totalname
]
=
self
:
createProgram
(
def
)
self
.
shad
=
_M
.
progs
[
self
.
totalname
]
for
k
,
v
in
pairs
(
def
.
args
)
do
self
:
setUniform
(
k
,
v
)
if
self
.
shad
then
for
k
,
v
in
pairs
(
def
.
args
)
do
self
:
setUniform
(
k
,
v
)
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
src/shaders.c
+
2
−
1
View file @
2a25fed8
...
...
@@ -140,7 +140,8 @@ static int program_compile(lua_State *L)
}
}
#endif
return
0
;
lua_pushboolean
(
L
,
TRUE
);
return
1
;
}
static
int
program_attach
(
lua_State
*
L
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment