mirror of
https://github.com/aap/librw.git
synced 2024-11-25 05:05:42 +00:00
Small fixes.
This commit is contained in:
parent
a528142254
commit
535b9f0042
@ -268,10 +268,10 @@ Instance(Atomic *atomic)
|
|||||||
uint8 *color = geo->colors;
|
uint8 *color = geo->colors;
|
||||||
float32 f[4];
|
float32 f[4];
|
||||||
for(int32 i = 0; i < geo->numVertices; i++){
|
for(int32 i = 0; i < geo->numVertices; i++){
|
||||||
f[0] = color[0];
|
f[0] = color[0]/255.0f;
|
||||||
f[1] = color[1];
|
f[1] = color[1]/255.0f;
|
||||||
f[2] = color[2];
|
f[2] = color[2]/255.0f;
|
||||||
f[3] = color[3];
|
f[3] = color[3]/255.0f;
|
||||||
packattrib(p, f, a);
|
packattrib(p, f, a);
|
||||||
color += 4;
|
color += 4;
|
||||||
p += a->stride;
|
p += a->stride;
|
||||||
|
@ -32,6 +32,7 @@ renderAtomic(Rw::Atomic *atomic)
|
|||||||
1, GL_FALSE, frm->ltm);
|
1, GL_FALSE, frm->ltm);
|
||||||
|
|
||||||
glVertexAttrib4f(3, 0.0f, 0.0f, 0.0f, 1.0f);
|
glVertexAttrib4f(3, 0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
glVertexAttrib3f(2, 0.0f, 0.0f, 0.0f);
|
||||||
if(inst->vbo == 0 && inst->ibo == 0)
|
if(inst->vbo == 0 && inst->ibo == 0)
|
||||||
Gl::UploadGeo(geo);
|
Gl::UploadGeo(geo);
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, inst->vbo);
|
glBindBuffer(GL_ARRAY_BUFFER, inst->vbo);
|
||||||
@ -139,7 +140,7 @@ init(void)
|
|||||||
"varying vec2 v_texCoord;"
|
"varying vec2 v_texCoord;"
|
||||||
"void main()"
|
"void main()"
|
||||||
"{"
|
"{"
|
||||||
" vec4 c0 = texture2D(u_texture0, v_texCoord/512.0f);"
|
" vec4 c0 = texture2D(u_texture0, v_texCoord/512.0);"
|
||||||
" gl_FragColor = v_color*c0;"
|
" gl_FragColor = v_color*c0;"
|
||||||
"}\n"
|
"}\n"
|
||||||
"#endif\n";
|
"#endif\n";
|
||||||
@ -184,7 +185,7 @@ init(void)
|
|||||||
// Rw::Image::setSearchPath("/home/aap/gamedata/ps2/gtasa/models/gta3_archive/txd_extracted/");
|
// Rw::Image::setSearchPath("/home/aap/gamedata/ps2/gtasa/models/gta3_archive/txd_extracted/");
|
||||||
// Rw::Image::setSearchPath("/home/aap/gamedata/ps2/gtavc/MODELS/gta3_archive/txd_extracted/");
|
// Rw::Image::setSearchPath("/home/aap/gamedata/ps2/gtavc/MODELS/gta3_archive/txd_extracted/");
|
||||||
Rw::Image::setSearchPath(
|
Rw::Image::setSearchPath(
|
||||||
"/home/aap/gamedata/ps2/gtavc/MODELS/gta3_archive/txd_extracted/;/home/aap/gamedata/ps2/gtasa/models/gta3_archive/txd_extracted/");
|
"/home/aap/gamedata/ps2/gta3/MODELS/gta3_archive/txd_extracted/;//home/aap/gamedata/ps2/gtavc/MODELS/gta3_archive/txd_extracted/;/home/aap/gamedata/ps2/gtasa/models/gta3_archive/txd_extracted/");
|
||||||
//"D:\\rockstargames\\ps2\\gtavc\\MODELS\\gta3_archive\\txd_extracted\\;D:\\rockstargames\\ps2\\gtasa\\models\\gta3_archive\\txd_extracted\\");
|
//"D:\\rockstargames\\ps2\\gtavc\\MODELS\\gta3_archive\\txd_extracted\\;D:\\rockstargames\\ps2\\gtasa\\models\\gta3_archive\\txd_extracted\\");
|
||||||
Rw::Gl::RegisterNativeRaster();
|
Rw::Gl::RegisterNativeRaster();
|
||||||
Rw::RegisterMaterialRightsPlugin();
|
Rw::RegisterMaterialRightsPlugin();
|
||||||
|
Loading…
Reference in New Issue
Block a user