Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions drivers/gles1/rasterizer_gles1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifdef GLES1_ENABLED
#if defined(GLES1_ENABLED) || defined(__psp2__)

#include "rasterizer_gles1.h"
#include "os/os.h"
Expand Down Expand Up @@ -3386,7 +3386,7 @@ void RasterizerGLES1::_setup_fixed_material(const Geometry *p_geometry,const Mat


}

#ifndef __psp2__
if(p_material->fixed_flags[VS::FIXED_MATERIAL_FLAG_USE_ENVMAP] && p_material->textures[VS::FIXED_MATERIAL_PARAM_ENVMAP].is_valid()) {

Texture *texture = texture_owner.get( p_material->textures[VS::FIXED_MATERIAL_PARAM_ENVMAP] );
Expand All @@ -3407,6 +3407,7 @@ void RasterizerGLES1::_setup_fixed_material(const Geometry *p_geometry,const Mat
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_2D);
#endif
if (p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE].is_valid()) {

Texture *texture = texture_owner.get( p_material->textures[VS::FIXED_MATERIAL_PARAM_DIFFUSE] );
Expand All @@ -3418,8 +3419,9 @@ void RasterizerGLES1::_setup_fixed_material(const Geometry *p_geometry,const Mat

glDisable(GL_TEXTURE_2D);
}
#ifndef __psp2__
}
#endif


}
Expand Down Expand Up @@ -4511,7 +4513,7 @@ void RasterizerGLES1::_render_list_forward(RenderList *p_render_list,bool p_reve
};

void RasterizerGLES1::_process_blur(int times, float inc) {

#ifndef __psp2__
float spost = 0.0f;
float alphainc = 0.9f / times;
float alpha = 0.2f;
Expand Down Expand Up @@ -4619,6 +4621,7 @@ void RasterizerGLES1::_process_blur(int times, float inc) {
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
#endif
}


Expand Down Expand Up @@ -6280,9 +6283,10 @@ void RasterizerGLES1::init() {


scene_pass=1;
#ifndef __psp2__
if (ContextGL::get_singleton())
ContextGL::get_singleton()->make_current();

#endif


Set<String> extensions;
Expand Down
6 changes: 5 additions & 1 deletion drivers/gles1/rasterizer_gles1.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "servers/visual/rasterizer.h"

#ifdef GLES1_ENABLED
#if defined(GLES1_ENABLED) || defined(__psp2__)

#include "image.h"
#include "rid.h"
Expand Down Expand Up @@ -62,7 +62,11 @@ class RasterizerGLES1 : public Rasterizer {
MAX_SCENE_LIGHTS=2048,
LIGHT_SPOT_BIT=0x80,
DEFAULT_SKINNED_BUFFER_SIZE = 1024 * 1024, // 10k vertices
#ifdef __psp2__
MAX_HW_LIGHTS = 8, //Yay! 8 Lights :blush:
#else
MAX_HW_LIGHTS = 4,
#endif
};
#ifdef PSP
void glActiveTexture(int a1) { };
Expand Down
3 changes: 2 additions & 1 deletion platform/vita/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Import('env')

common_vita=[\
"os_vita.cpp",\
"rasterizer_vita.cpp",\
"audio_driver_vita.cpp",\
#"rasterizer_vita.cpp",\

#"immvertex.c",\
#
]
Expand Down
6 changes: 4 additions & 2 deletions platform/vita/os_vita.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#endif

#include "servers/visual/visual_server_raster.h"
#include "servers/visual/rasterizer_dummy.h"
// #include "servers/visual/rasterizer_dummy.h"
#ifdef PSP2_GLES2

extern "C" {
Expand All @@ -40,7 +40,7 @@ extern "C" {

#include "drivers/gles2/rasterizer_gles2.h"
#else
#include "rasterizer_vita.h"
#include "drivers/gles1/rasterizer_gles1.h"
#endif
#include "os_vita.h"
#include <stdio.h>
Expand Down Expand Up @@ -507,6 +507,8 @@ void OS_VITA::init_camera() {
else
camera_init = true;

sceCameraSetNightmode(SCE_CAMERA_DEVICE_BACK, SCE_CAMERA_NIGHTMODE_LESS10);

set_camera_image(camera_image);
}

Expand Down
Loading