mirror of https://github.com/aap/librw.git
Small fixes.
This commit is contained in:
parent
a528142254
commit
535b9f0042
|
@ -268,10 +268,10 @@ Instance(Atomic *atomic)
|
|||
uint8 *color = geo->colors;
|
||||
float32 f[4];
|
||||
for(int32 i = 0; i < geo->numVertices; i++){
|
||||
f[0] = color[0];
|
||||
f[1] = color[1];
|
||||
f[2] = color[2];
|
||||
f[3] = color[3];
|
||||
f[0] = color[0]/255.0f;
|
||||
f[1] = color[1]/255.0f;
|
||||
f[2] = color[2]/255.0f;
|
||||
f[3] = color[3]/255.0f;
|
||||
packattrib(p, f, a);
|
||||
color += 4;
|
||||
p += a->stride;
|
||||
|
|
|
@ -32,6 +32,7 @@ renderAtomic(Rw::Atomic *atomic)
|
|||
1, GL_FALSE, frm->ltm);
|
||||
|
||||
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)
|
||||
Gl::UploadGeo(geo);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, inst->vbo);
|
||||
|
@ -139,7 +140,7 @@ init(void)
|
|||
"varying vec2 v_texCoord;"
|
||||
"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;"
|
||||
"}\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/gtavc/MODELS/gta3_archive/txd_extracted/");
|
||||
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\\");
|
||||
Rw::Gl::RegisterNativeRaster();
|
||||
Rw::RegisterMaterialRightsPlugin();
|
||||
|
|
Loading…
Reference in New Issue